<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="UTF-8">
    <title>navigation</title>
</head>
<body>
<!-- 左边导航栏 -->
<!--
参数说明：
    @param status: Integer // 值为 1-12 分别对应侧边栏菜单的 12 个菜单按钮，对应 12 个不同页面
-->
<!-- begin::navigation -->
<div th:fragment="navigation(status)" class="navigation" style="overflow: auto visible; outline: none;">

    <!-- begin::logo -->
    <div id="logo">
        <a href="/customer-service/index">
            <br><h2 style="display: inline-block; font-weight: bold">云</h2><h2 style="display: inline-block; color: #0d5ff5; font-weight: bold">客服</h2>
        </a>
    </div>
    <!-- end::logo -->

    <!-- begin::navigation header -->
    <header class="navigation-header">
        <figure class="avatar avatar-state-success">
            <img src="assets/media/image/user/man_avatar3.jpg" class="rounded-circle" alt="image">
        </figure>
        <div>
            <!--/*@thymesVar id="nickName" type="java.lang.String"*/-->
            <h5 th:text="(${session.user}==null)?${session.user.getRealname()}:''"></h5>
            <p class="text-muted" th:text="(${session.user}!=null)?${session.user.getServicerole()}:''"></p>
            <ul class="nav">
                <li class="nav-item">
                    <a  href="#" data-target="#compose-admin" data-toggle="modal" class="btn nav-link bg-info-bright" title="Profile">
                        <i data-feather="user"></i>
                    </a>
                </li>
                <li class="nav-item">
                    <a href="/customer-service/logout" class="btn nav-link bg-danger-bright" title="Logout" data-toggle="tooltip">
                        <i data-feather="log-out"></i>
                    </a>
                </li>
            </ul>
        </div>
    </header>
    <!-- end::navigation header -->

    <!-- begin::navigation menu -->
    <div class="navigation-menu-body">
        <ul>
            <li class="navigation-divider">Home</li>
            <li>
                <a href="/customer-service/index" th:class="(${status} eq 1)?'active':''">
                    <i class="nav-link-icon" data-feather="bar-chart-2"></i>
                    <span>首页</span>
                </a>
            </li>
            <li class="navigation-divider">Session</li>
            <li>
                <a shiro:hasPermission="announce" href="/session/getall" th:class="(${status} eq 2)?'active':''">
                    <i class="nav-link-icon" data-feather="message-circle"></i>
                    <span>会话</span>
                </a>
                <a shiro:lacksPermission="announce" href="/session/new" th:class="(${status} eq 21)?'active':''">
                    <i class="nav-link-icon" data-feather="message-circle"></i>
                    <span>联系管理员</span>
                </a>
            </li>
            <li>
                <a shiro:lacksPermission="announce" href="/session/getall" th:class="(${status} eq 2)?'active':''">
                    <i class="nav-link-icon" data-feather="message-circle"></i>
                    <span>会话</span>
                </a>
            </li>
            <li>
                <a href="/chatHistory" th:class="(${status} eq 3)?'active':''">
                    <i class="nav-link-icon" data-feather="calendar"></i>
                    <span>会话历史</span>
                </a>
            </li>
            <li>
                <a href="/visitor" th:class="(${status} eq 4)?'active':''">
                    <i class="nav-link-icon" data-feather="globe"></i>
                    <span>访客</span>
                </a>
            </li>
            <li class="navigation-divider">Manage</li>
            <li>
                <a href="/customerManage/customerTables" th:classappend="(${status} == 5 or ${status} == 51)?'active':''">
                    <i class="nav-link-icon" data-feather="user"></i>
                    <span>客户管理</span>
                </a>
            </li>
            <li>
                <a href="/orderManager" th:class="(${status} eq 6)?'active':''">
                    <i class="nav-link-icon" data-feather="file"></i>
                    <span>工单管理</span>
                </a>
            </li>
            <li class="navigation-divider">Extra</li>
            <li>
                <a href="/statistics" th:class="(${status} eq 7)?'active':''">
                    <i class="nav-link-icon" data-feather="pie-chart"></i>
                    <span>统计</span>
                </a>
            </li>
            <li id="drag">
                <a>
                    <i class="nav-link-icon" data-feather="settings"></i>
                    <span>设置</span>
                </a>
                <ul>
                    <li><a href="/generalSettings" th:class="(${status} eq 8)?'active':''">通用设置</a></li>
                    <li><a href="/teamSettings" th:class="(${status} eq 9)?'active':''">团队设置</a></li>
                    <li><a href="/cusServSettings" th:class="(${status} eq 10)?'active':''">客服设置</a></li>
                    <li><a href="/workOrderSettings" th:class="(${status} eq 11)?'active':''">工单设置</a></li>
                    <li><a href="/globalSettings" th:class="(${status} eq 12)?'active':''">全局设置</a></li>
                </ul>
            </li>
        </ul>
    </div>
    <!-- end::navigation menu -->
</div>
<!-- end::navigation -->

</body>
</html>